<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<style>
{#    css  #}
    h1{
        color: red;
        text-align: center;
        font-size: 50px;
    }

</style>

<body>

<h1 id="xx">大家晚上好</h1>

<button id="btn">
    点击我
</button>
<!--
HTML  写骨架
CSS  化妆   写颜色
JS   美容 添加灵魂
-->

<script>
    document.getElementById('btn').onclick = function () {
        document.getElementById('xx').innerText = "隔壁老王"
}

</script>






</body>



</html>